//
//  CustomOneTypeTableViewCell.m
//  ChunLaiZhuangClient
//
//  Created by zzs on 16/2/16.
//  Copyright © 2016年 CLZ. All rights reserved.
//

#import "CustomOneTypeTableViewCell.h"

@implementation CustomOneTypeTableViewCell

- (void)awakeFromNib {
    

}
-(void)setCarouselModel:(Image_carouselModel *)carouselModel{
    _carouselModel=carouselModel;
    Image_module_dataModel *model=carouselModel.module_data;
    
    NSMutableArray *urlsArray=[[NSMutableArray alloc] init];
    for (int i=0; i<model.slides.count; i++) {
        Image_slidesModel *slideModel=model.slides[i];
        [urlsArray addObject:slideModel.image];
    }
    
    SDCycleScrollView *banner2 = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 200) delegate:self placeholderImage:nil];
    banner2.pageControlAliment = SDCycleScrollViewPageContolAlimentRight;
    banner2.imageURLStringsGroup = urlsArray;
    [self addSubview:banner2];
    
}
#pragma mark - SDCycleScrollViewDelegate

- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index
{
    Image_module_dataModel *model=_carouselModel.module_data;
    Image_slidesModel *slideModel=model.slides[index];
    [TransferManager transferToSomeViewType:slideModel.link_type linkID:slideModel.link_id linkName:slideModel.link_name fromView:self];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
